package tech.aistar.corejava.day07.extend;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/7/23 0023
 */
public class Rect extends Shape{

    private int len;

    private int width;

    public Rect(){

    }

    public Rect(int len,int width){
        this.len = len;
        this.width = width;
    }

    @Override
    public double girth() {
        return 2*(len + width);
    }

    @Override
    public double area() {
        return len * width;
    }
}
